<template>
  <div class="app-container" :class="{ 'dark': isDark }">
    <header-bar />
    <div class="main-container">
      <side-bar />
      <div class="content-container">
        <router-view />
      </div>
    </div>
  </div>
</template>

<script setup>
import HeaderBar from './components/HeaderBar.vue'
import SideBar from './components/SideBar.vue'
import { useConfigStore } from '@/store/modules/config'

const configStore = useConfigStore()
const isDark = computed(() => configStore.isDark)
</script>

<style scoped>
.app-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.content-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.dark {
  background-color: #1a1a1a;
  color: #ffffff;
}
</style>